package hrm.action.factory;

import hrm.action.Action;
import hrm.action.ActionFactory;
import hrm.action.org.OrgBaseEndAction;
import hrm.action.org.OrgBaseInfoAction;
import hrm.action.org.OrgBaseInsertAction;
import hrm.action.org.OrgBaseUpdateAction;
import hrm.action.org.OrgBeforeBaseEndAction;
import hrm.action.org.OrgBeforeBaseInsertAction;
import hrm.action.org.OrgBeforeBaseUpdateAction;
import hrm.action.org.OrgCodeCheckAction;
import hrm.action.org.OrgIndexAction;
import hrm.action.org.OrgMemberCount;
import hrm.action.org.OrgPersonInfoAction;



public class OrgActionFactory implements ActionFactory {
	private static OrgActionFactory factory;
	
	public static OrgActionFactory getInstance(){
		if(factory==null){
			factory=new OrgActionFactory();
		}
		return factory;
	}

	public Action getAction(String command){
		Action action=null;
		if(command.equalsIgnoreCase("index")){
			action=new OrgIndexAction();
		}else if(command.equalsIgnoreCase("baseinfo")){
			action=new OrgBaseInfoAction();
		}else if(command.equalsIgnoreCase("personinfo")){
			action=new OrgPersonInfoAction();
		}else if(command.equalsIgnoreCase("membercount")){
			action=new OrgMemberCount();
		}else if(command.equalsIgnoreCase("bfbaseinsert")){
			action=new OrgBeforeBaseInsertAction();
		}else if(command.equalsIgnoreCase("bfbaseupdate")){
			action=new OrgBeforeBaseUpdateAction();
		}else if(command.equalsIgnoreCase("orgbaseinsert")){
			action=new OrgBaseInsertAction();
		}else if(command.equalsIgnoreCase("codecheck")){
			action=new OrgCodeCheckAction();
		}else if(command.equalsIgnoreCase("orgbaseupdate")){
			action=new OrgBaseUpdateAction();
		}else if(command.equalsIgnoreCase("bfbaseend")){
			action=new OrgBeforeBaseEndAction();
		}else if(command.equalsIgnoreCase("orgbaseend")){
			action=new OrgBaseEndAction();
		}
		return action;
	}//
}
